<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<rich:tab id="customerTabAttrId"
	header="#{func.description}">

	<rich:dataTable id="customerAttributeTableId"
		value="#{updateCustomerBean.customer.customerAttributeList}"
		var="attributeVo" iterationStatusVar="sta"
		rendered="#{updateCustomerBean.customer.customerAttributeList.size()>0}">
		<f:facet name="header">
			<rich:columnGroup>
				<rich:column>
					<h:outputText value=""></h:outputText>
				</rich:column>
				<rich:column>
					<h:outputText value="#{msg.label_addition_category}"></h:outputText>
				</rich:column>
				<rich:column>
					<h:outputText value="#{msg.label_addition_value}"></h:outputText>
				</rich:column>
				<rich:column>
					<h:outputText value="#{msg.label_addition_rmk_1}"></h:outputText>
				</rich:column>
				<rich:column>
					<h:outputText value="#{msg.label_addition_rmk_2}"></h:outputText>
				</rich:column>
				<rich:column>
					<h:outputText value=""></h:outputText>
				</rich:column>
			</rich:columnGroup>
		</f:facet>

		<rich:columnGroup>
			<rich:column>
				<h:outputText value="#{sta.count}"></h:outputText>
			</rich:column>
			<rich:column>
				<h:selectOneMenu value="#{attributeVo.attrCde}"
					disabled="#{func.permission == 'R'}">
					<f:selectItem itemLabel="" itemValue=""></f:selectItem>
					<f:selectItems value="#{updateCustomerBean.attrCodeItems}"></f:selectItems>
				</h:selectOneMenu>
			</rich:column>
			<rich:column>
				<h:inputText size="16" value="#{attributeVo.attrVal}"
					disabled="#{func.permission == 'R'}"
					validatorMessage="Validation Error: Invalid zip" id="attrValInput"
					maxlength="80">
					<f:validateRegex pattern="([0-9])*"></f:validateRegex>
					<rich:validator />
				</h:inputText>
				<rich:message for="attrValInput"></rich:message>
			</rich:column>
			<rich:column>
				<h:inputText size="25" value="#{attributeVo.remark1}"
					disabled="#{func.permission == 'R'}"
					maxlength="150"></h:inputText>
			</rich:column>
			<rich:column>
				<h:inputText size="25" value="#{attributeVo.remark2}"
					disabled="#{func.permission == 'R'}"
					maxlength="100"></h:inputText>
			</rich:column>
			<rich:column>
				<a4j:commandButton
					rendered="#{func.permission == 'W'}"
					actionListener="#{updateCustomerBean.deleteAttribute}"
					render="customerTabAttrId" value="#{msg.button_delete}">
					<f:param name="attributeIndex" value="#{sta.index}"></f:param>
				</a4j:commandButton>
			</rich:column>
		</rich:columnGroup>
	</rich:dataTable>

	<a4j:commandLink
		rendered="#{func.permission == 'W'}"
		actionListener="#{updateCustomerBean.addAttribute}"
		render="customerTabAttrId" value="#{msg.label_addition_add}">
	</a4j:commandLink>


</rich:tab>
</html>